import request from "../request.js"
import {HttpMethod } from "../consts.js"
const baseUrl = "http://localhost:8080"

const api = {
	/**
	 * 登录
	 */
	signin: {
		/**
		 * 请求地址
		 */
		url: ()=> `${baseUrl}/auth/signin`,
		/**
		 * 请求方式
		 */
		method: HttpMethod.POST
	},
    getActivityList: {
        url: () => `${baseUrl}/detail/activity`,
        method: HttpMethod.GET
    }
}

export default {
	/**
	 * 登录
	 */
	signin(data) {
        console.log(data)
		return request({
			url: api.signin.url(),
			method: api.signin.method,
			data
		})
	},
    getActivityList(data) {
        console.log(data)
    	return request({
    		url: api.getActivityList.url(),
    		method: api.getActivityList.method,
    		data
    	})
    }
}